﻿// //  ********************************************************************************
// //  Copyright (C) 2016 Sebastian Kenter. All rights reserved.
// // 
// //  Name    : MultiServerEngine | ServerFramework | ITelegram.cs
// //  Created : 2016 - 02 - 16 20:53
// //  Modified: 2016 - 02 - 20 12:33
// //  ********************************************************************************

using System.Collections.Generic;
using TypeDefs;

namespace ServerFramework.Interfaces.Telegram
{
    /// <summary>
    ///     Interface for a telegram to be handled by the server
    /// </summary>
    public interface ITelegram
    {
        /// <summary>
        ///     Type of the telegram (request, response, event)
        ///     This one must match the type of the telegram handler
        /// </summary>
        TelegramTypes Type { get; }

        /// <summary>
        ///     The operation code of the telegram
        ///     This one must match the operation code of one or more handler(s)
        /// </summary>
        byte Code { get; }

        /// <summary>
        ///     The operation sub-code of the telegram
        ///     This one must match the sub-code of one! handler
        /// </summary>
        int? SubCode { get; }

        /// <summary>
        ///     The operation parameters of the telegram
        /// </summary>
        Dictionary<byte, object> Parameters { get; }
    }
}
